package Servlet2;


import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/dididi08")
public class Demo08 extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doPost(req, resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String s = "您的用户名或者密码错误,3秒后经自动跳转到而登陆页面";
        resp.setContentType("text/html;charset=UTF-8");
        resp.getWriter().write(s);
        resp.setHeader("Refresh","3;URL=/day08/注册页面/注册.html");
    }
}


